//package com.example.leon.demo.common;
package com.example.wanglong.myoneapplication.common;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.util.Log;

import com.example.wanglong.myoneapplication.common.ActivityCollector;


/**
 * Created by wang.long on 2016/3/28.
 */
public class BaseActivity extends Activity {

    @Override
    protected void onCreate(Bundle saveInstanceState) {
        super.onCreate(saveInstanceState);

        Log.d("BaseActivity", getClass().getCanonicalName());

        //关闭横屏
        super.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        ActivityCollector.addActivity(this);

    }

    @Override
    protected void onDestroy(){
        super.onDestroy();
        ActivityCollector.removeActivity(this);
    }
}
